import { useEffect,useState } from "react";

export default function D() {
  const [link,setLink] = useState(false)


  useEffect(() => {
    // console.log("函数组件来咯");
  }, []);

  return <div className="content">{
    link ? (<span>武汉市</span>) : (<span>北京市</span>)
  }
  <button onClick={()=>{
    setLink((pre)=> !pre )
  }}></button>
  </div>;
}
